var Router = require('koa-router');
var router = new Router();
router.post('/user', (ctx) => {
    ctx.body = {
        code: 200,
        data: {}
      }
})
router.get('/user', (ctx) => {
    ctx.body = {
        code: 200,
        data: {
            list: [
                {
                  name: 'a',
                  id: 23,
                  status: 1,
                  avatar: 'http://192.168.0.102:7001/uploads/1540220853372.jpg'
                },
                {
                  name: 'a',
                  id: 25,
                  status: 0
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                },
                {
                  name: 'a'
                }
              ]
        }
    }
})
router.get('/user/:id', (ctx) => {
    ctx.body = {
        code: 200,
        data: {}
    }
})
router.put('/user/:id', (ctx) => {
    console.log(ctx.params)
    ctx.body = {
        code: 200,
        data: {}
    }
})
router.delete('/user/:id', (ctx) => {
    console.log(ctx.params.id)
    ctx.body = {
        code: 200,
        data: {}
    }
})

module.exports = router.routes();